<html>
<head>
    <meta />
    <title></title>
</head>

<body>
    <p><input type="text" value="北京市" /></p>
    <p><input type="text" value="朝阳区" /></p>
    <p><button>传参</button></p>
</body>
<script>
    var a1 = function (a, b) {
        alert(a.value);
        alert(b.value)
    };
    window.onload = function () {
        var a2 = document.getElementsByTagName("input");
        var a3 = document.getElementsByTagName("button")[0];
        a3.onclick = function () {
            a1(a2[0], a2[1])
        }
    };
</script>

</html>
<style>
</style>